package com.luo.backend.repository;

import com.luo.backend.entity.FoodCategory;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 商品分类数据访问接口
 */
@Repository
public interface FoodCategoryRepository extends JpaRepository<FoodCategory, Long> {
    
    /**
     * 根据状态查找分类，按排序字段排序
     */
    List<FoodCategory> findByStatusOrderBySortOrderAscCreatedAtAsc(Integer status);
    
    /**
     * 根据状态查找分类，按排序字段升序
     */
    List<FoodCategory> findByStatusOrderBySortOrderAsc(Integer status);
}

